<template>
  <div class="h-full text-center">
    <span class="demonstration text-1xl">访情信息轮播</span>
    <el-carousel
      height="220px"
      indicator-position="none"
    >
      <el-carousel-item
        v-for="item in data?.FangQingList"
        :key="item"
      >
        <div
          class="text-base text-left m-4 indent-4 text-white"
          text="1xl"
        >
          {{ item }}
        </div>
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script setup lang="ts">
import type { PropType } from "vue";
import type { Fangqing } from "@/apis/homeApi";

defineProps({
  data: {
    type: Object as PropType<Fangqing>,
    require: true,
  },
});
</script>

<style scoped lang="scss">
.demonstration {
  color: var(--el-text-color-secondary);
}
.el-carousel__item {
  div {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 8;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.el-carousel__item:nth-child(2n) {
//   background-color: #99a9bf;
  opacity: 0.8;
}

.el-carousel__item:nth-child(2n + 1) {
//   background-color: #d3dce6;
   opacity: 0.8;
}

.el-card {
  background-color: rgba(0, 0, 0, 0.15);
}
</style>
